package com.cn.trip.service;


import com.cn.trip.DbDao.CardDao;
import com.cn.trip.DbDao.UserDao;

public class CardService {
	public boolean addCard(String card,String password,int user_id) {
		CardDao dao=new CardDao();
		
		int flag=dao.addCard(card, password);
		if(flag>0) {
			UserDao userDao=new UserDao();
			if(userDao.boundCart(user_id, card)>0)
			return true;
		}
		return false;
	}
}
